home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / gas_251.zip / bin_251 / binutils / Makefile.in < prev    next >
Makefile  |  1994-10-22  |  20KB  |  611 lines

  1. # Makefile for GNU binary-file utilities
  2. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  3.  
  4. # This file is part of GNU binutils.
  5.  
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2 of the License, or
  9. # (at your option) any later version.
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. srcdir = .
  19.  
  20. prefix = /usr/local
  21.  
  22. program_transform_name =
  23. exec_prefix = $(prefix)
  24. bindir = $(exec_prefix)/bin
  25. libdir = $(exec_prefix)/lib
  26. tooldir = $(exec_prefix)/$(target_alias)
  27.  
  28. datadir = $(prefix)/lib
  29. mandir = $(prefix)/man
  30. man1dir = $(mandir)/man1
  31. man2dir = $(mandir)/man2
  32. man3dir = $(mandir)/man3
  33. man4dir = $(mandir)/man4
  34. man5dir = $(mandir)/man5
  35. man6dir = $(mandir)/man6
  36. man7dir = $(mandir)/man7
  37. man8dir = $(mandir)/man8
  38. man9dir = $(mandir)/man9
  39. infodir = $(prefix)/info
  40. includedir = $(prefix)/include
  41. docdir = $(datadir)/doc
  42.  
  43. SHELL = /bin/sh
  44.  
  45. INSTALL = `cd $(srcdir)/..;pwd`/install.sh -c
  46. INSTALL_PROGRAM = $(INSTALL)
  47. INSTALL_DATA = $(INSTALL) 
  48. INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)'
  49. INSTALL_XFORM1 = $(INSTALL_XFORM) -b=.1
  50.  
  51. AR = ar
  52. AR_FLAGS = qv
  53. CFLAGS = -g
  54. MAKEINFO = makeinfo
  55. TEXI2DVI = texi2dvi
  56. RANLIB = ranlib
  57. BISONFLAGS = -d
  58. TEXI2ROFF=texi2roff
  59. MAKEOVERRIDES=
  60. CC_FOR_BUILD = $(CC)
  61. NM_FOR_TARGET = nm
  62. NM = $(NM_FOR_TARGET)
  63. SYMLINK = ln -s
  64.  
  65. BISON = bison -y
  66. # Comment these out if using lex.
  67. LEX_OPTIONS = -I -Cem 
  68. LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo flex ; fi`
  69.  
  70. # Distribution version
  71. VERSION=2.5.1
  72. # Distribution name
  73. DIST_NAME=binutils-${VERSION}
  74.  
  75. version=`./../gcc/gcc -dumpversion`
  76.  
  77. # Where to find texinfo.tex to format docn with TeX
  78. TEXIDIR = $(srcdir)/../texinfo
  79.  
  80. #CC=gcc -Wall
  81. CC=cc
  82. # these two are almost the same program
  83. AR_PROG=ar
  84. RANLIB_PROG=ranlib
  85.  
  86. # objcopy and strip should be the same program
  87. OBJCOPY_PROG=objcopy
  88. STRIP_PROG=strip.new
  89.  
  90. STRINGS_PROG=strings
  91.  
  92. # These should all be the same program too.
  93. SIZE_PROG=size
  94. NM_PROG=nm.new
  95. OBJDUMP_PROG=objdump
  96.  
  97. # This is the demangler, as a standalone program.
  98. # Note: This one is used as the installed name too, unlike the above.
  99. DEMANGLER_PROG=c++filt
  100.  
  101. NLMCONV_PROG=nlmconv
  102.  
  103. SRCONV_PROG=srconv sysdump coffdump 
  104.  
  105. MANPAGES= ar nm objdump ranlib size strings strip objcopy nlmconv
  106.  
  107. PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRINGS_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) $(BUILD_NLMCONV) $(BUILD_SRCONV) $(SYSINFO_PROG) 
  108. STAGESTUFF = $(PROGS) *.o
  109. # Files that can be generated, but should be in the distribution.
  110. DISTSTUFF=arparse.c arlex.c nlmheader.c sysinfo.c syslex.c info
  111.  
  112. # Stuff that goes in tooldir/ if appropriate
  113. TOOL_PROGS = nm.new strip.new ar ranlib
  114.  
  115. BASEDIR = $(srcdir)/..
  116. BFDDIR = $(BASEDIR)/bfd
  117. INCDIR    = $(BASEDIR)/include
  118. INCLUDES = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR)
  119.  
  120. #### host and target dependant Makefile fragments come in here.
  121. ###
  122.  
  123. ALL_CFLAGS = $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS)
  124.  
  125. .c.o:
  126.     $(CC) -c $(ALL_CFLAGS) $<
  127.  
  128. #
  129. ## Random definitions
  130. # Hopefully all these may be flushed once we get configuration down pat.
  131.  
  132. # alloca only needed for systems which don't have it and when cc != gcc.
  133. # ALLOCA = alloca.o
  134.  
  135. # nm tries to malloc enough space for the string table.  The old GNU malloc
  136. # rounds this up to a power of two (e.g. 5M becomes 8M), and so it might 
  137. # fail unnecessarily.  I've also seen some Unix malloc's fail, even when
  138. # there is enough memory.  So use the new GNU malloc.
  139. # MALLOC = gmalloc.o
  140. # Use this if the system malloc is good enough.
  141. MALLOC =
  142.  
  143. # Use the GNU getopt unless you have problems with it.
  144. # The IRIS version could probably benefit from being assembled with
  145. # libmalloc rather than the ordinary malloc.
  146. LIBIBERTY = ../libiberty/libiberty.a
  147.  
  148. # Code shared by all the binutils.
  149. BULIBS = bucomm.o version.o filemode.o
  150.  
  151. ADDL_LIBS = $(MALLOC) $(BULIBS) $(BFD) $(LIBIBERTY) 
  152.  
  153. BFD = ../bfd/libbfd.a
  154. OPCODES = ../opcodes/libopcodes.a
  155.  
  156. RUNTEST = runtest
  157. RUNTESTFLAGS = 
  158. FLAGS_TO_PASS = \
  159.     "CC=$(CC)" \
  160.     "CFLAGS=$(CFLAGS)" \
  161.     "RUNTEST=$(RUNTEST)" \
  162.     "RUNTESTFLAGS=$(RUNTESTFLAGS)"
  163.  
  164. #
  165. ## The rules
  166.  
  167. all: $(ADDL_LIBS) $(PROGS)
  168.  
  169. testsuite:
  170.     if [ -f testsuite/Makefile.in ]; then \
  171.         (rootme=`pwd`/ ; export rootme ; \
  172.          rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
  173.          cd testsuite; $(MAKE) FLAGS_TO_PASS=$(FLAGS_TO_PASS)); \
  174.     else true ; fi
  175.  
  176. check: force
  177.     rootme=`pwd`; export rootme; cd testsuite ; \
  178.     $(MAKE) check $(FLAGS_TO_PASS)
  179.  
  180. installcheck:
  181.     /bin/sh $(srcdir)/sanity.sh $(bindir)
  182.  
  183. info: binutils.info
  184.  
  185. dvi: binutils.dvi
  186.  
  187. $(SIZE_PROG): $(ADDL_LIBS) size.o $(BFD)
  188.     $(CC) $(CFLAGS) $(LDFLAGS) -o $(SIZE_PROG) size.o $(ADDL_LIBS) $(EXTRALIBS)
  189.  
  190. $(OBJCOPY_PROG): $(ADDL_LIBS) objcopy.o not-strip.o $(BFD)
  191.     $(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJCOPY_PROG) objcopy.o not-strip.o $(ADDL_LIBS) $(EXTRALIBS)
  192.  
  193. $(STRINGS_PROG): $(ADDL_LIBS) strings.o $(BFD)
  194.     $(CC) $(CFLAGS) $(LDFLAGS) -o $(STRINGS_PROG) strings.o $(ADDL_LIBS) $(EXTRALIBS)
  195.  
  196. $(STRIP_PROG): $(ADDL_LIBS) objcopy.o is-strip.o $(BFD)
  197.     $(CC) $(CFLAGS) $(LDFLAGS) -o $(STRIP_PROG) objcopy.o is-strip.o $(ADDL_LIBS) $(EXTRALIBS)
  198.  
  199. $(NM_PROG): $(ADDL_LIBS) nm.o $(BFD)
  200.     $(CC) $(CFLAGS) $(LDFLAGS) -o $(NM_PROG) nm.o $(ADDL_LIBS) $(EXTRALIBS)
  201.  
  202. $(OBJDUMP_PROG): $(ADDL_LIBS) objdump.o $(BFD) $(OPCODES)
  203.     $(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJDUMP_PROG) objdump.o $(OPCODES) $(ADDL_LIBS) $(EXTRALIBS)
  204.  
  205. underscore.c: Makefile
  206.     rm -f underscore.c
  207.     echo '/*WARNING: This file is automatically generated!*/' >underscore.t
  208.     echo "int prepends_underscore = $(UNDERSCORE);" >>underscore.t
  209.     mv -f underscore.t underscore.c
  210.  
  211. version.o: version.c Makefile
  212.     $(CC) $(INCLUDES) $(HDEFINES) $(TDEFINES) -DVERSION='"$(VERSION)"' $(CFLAGS) -c $(srcdir)/version.c
  213.  
  214. cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h
  215.     $(CC) -c -DMAIN $(INCLUDES) $(HDEFINES) $(TDEFINES) $(CFLAGS) $(BASEDIR)/libiberty/cplus-dem.c
  216.  
  217. $(DEMANGLER_PROG): cplus-dem.o $(LIBIBERTY) underscore.o version.o
  218.     $(CC) $(CFLAGS) $(LDFLAGS)  -o $(DEMANGLER_PROG) cplus-dem.o $(LIBIBERTY) $(EXTRALIBS) underscore.o version.o
  219.  
  220. arparse.c: arparse.y
  221.     $(BISON) $(BISONFLAGS)  $(srcdir)/arparse.y
  222.     mv -f y.tab.c arparse.c
  223.     mv -f y.tab.h arparse.h
  224.  
  225. # Separate from arparse.c so that a parallel make doesn't try to build
  226. # both arparse.c and arparse.h simultaneously.
  227. arparse.h: arparse.c
  228.  
  229. arlex.c: arlex.l
  230.     $(LEX) $(LEX_OPTIONS) $(srcdir)/arlex.l
  231.     mv lex.yy.c arlex.c
  232.  
  233. $(AR_PROG): $(ADDL_LIBS) ar.o arparse.o arlex.o not-ranlib.o $(BFD) arsup.o
  234.     $(CC) $(CFLAGS) $(LDFLAGS) -o $(AR_PROG) ar.o arparse.o arlex.o arsup.o not-ranlib.o $(ADDL_LIBS) $(EXTRALIBS)
  235.  
  236. $(RANLIB_PROG): $(ADDL_LIBS) ar.o is-ranlib.o arparse.o arlex.o arsup.o $(BFD)
  237.     $(CC) $(CFLAGS) $(LDFLAGS) -o $(RANLIB_PROG) ar.o arparse.o arlex.o arsup.o is-ranlib.o $(ADDL_LIBS) $(EXTRALIBS)
  238.  
  239. # This rule creates a single binary that switches between ar and ranlib
  240. # by looking at argv[0].  Use this kludge to save some disk space.
  241. # However, you have to install things by hand.
  242. # (That is after 'make install', replace the installed ranlib by a link to ar.)
  243.  
  244. # Alternatively, you can install ranlib.sh as ranlib.
  245.  
  246. ar_with_ranlib: $(ADDL_LIBS) ar.o maybe-ranlib.o $(BFD)
  247.     $(CC) $(CFLAGS) $(LDFLAGS) -o $(AR_PROG) ar.o maybe-ranlib.o $(ADDL_LIBS) $(EXTRALIBS)
  248.     -rm -f $(RANLIB_PROG)
  249.     -ln $(AR_PROG) $(RANLIB_PROG)
  250.  
  251. # objcopy and strip in one binary that uses argv[0] to decide its action.
  252.  
  253. objcopy_with_strip: $(ADDL_LIBS) objcopy.o maybe-strip.o $(BFD)
  254.     $(CC) $(CFLAGS) $(LDFLAGS) -o $(OBJCOPY_PROG) objcopy.o maybe-strip.o $(ADDL_LIBS) $(EXTRALIBS)
  255.     -rm -f $(STRIP_PROG)
  256.     -ln $(OBJCOPY_PROG) $(STRIP_PROG)
  257.  
  258. sysroff.c: sysinfo sysroff.info 
  259.     ./sysinfo -c <$(srcdir)/sysroff.info >sysroff.c
  260.     ./sysinfo -i <$(srcdir)/sysroff.info >>sysroff.c
  261.     ./sysinfo -g <$(srcdir)/sysroff.info >>sysroff.c
  262.  
  263. sysroff.h: sysinfo sysroff.info
  264.     ./sysinfo -d <$(srcdir)/sysroff.info >sysroff.h    
  265.  
  266. # Depend upon arparse.c to avoid building both arparse.c and sysinfo.c
  267. # simultaneously.
  268. sysinfo.c: sysinfo.y arparse.c
  269.     $(BISON) -tvd $(srcdir)/sysinfo.y
  270.     rm -f sysinfo.c
  271.     mv -f y.tab.c sysinfo.c
  272.     mv -f y.tab.h sysinfo.h
  273.  
  274. # Separate from sysinfo.c so that a parallel make doesn't try to build
  275. # both sysinfo.c and sysinfo.h simultaneously.
  276. sysinfo.h: sysinfo.c
  277.  
  278. syslex.c : syslex.l
  279.     $(LEX) $(LEX_OPTIONS) $(srcdir)/syslex.l
  280.     mv lex.yy.c syslex.c
  281.     
  282. sysinfo: sysinfo.o syslex.o
  283.     $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) -o $@ sysinfo.o syslex.o 
  284.  
  285. syslex.o: syslex.c sysinfo.h
  286.     if [ -r syslex.c ]; then \
  287.       $(CC_FOR_BUILD) -c -I. $(CFLAGS)  syslex.c  ; \
  288.     else \
  289.       $(CC_FOR_BUILD) -c -I. $(CFLAGS) $(srcdir)/syslex.c ;\
  290.     fi
  291.  
  292. sysinfo.o: sysinfo.c
  293.     if [ -r sysinfo.c ]; then \
  294.       $(CC_FOR_BUILD) -c -I. $(CFLAGS)  sysinfo.c  ; \
  295.     else \
  296.       $(CC_FOR_BUILD) -c -I. $(CFLAGS) $(srcdir)/sysinfo.c ; \
  297.     fi
  298.  
  299. srconv.o: srconv.c sysroff.h sysroff.c coffgrok.h $(INCDIR)/coff/internal.h \
  300.   ../bfd/libcoff.h
  301.  
  302. srconv: srconv.o coffgrok.o $(ADDL_LIBS)
  303.     $(CC) $(CFLAGS) $(LDFLAGS) -o $@ srconv.o coffgrok.o $(ADDL_LIBS) $(EXTRALIBS)
  304.  
  305. coffdump: coffdump.o coffgrok.o $(ADDL_LIBS)
  306.     $(CC) $(CFLAGS) $(LDFLAGS) -o $@  coffdump.o coffgrok.o $(ADDL_LIBS) $(EXTRALIBS)
  307.  
  308. sysdump.o: sysdump.c sysroff.h sysroff.c
  309.  
  310. sysdump: sysdump.o $(ADDL_LIBS)
  311.     $(CC) $(CFLAGS) $(LDFLAGS) -o $@ sysdump.o $(ADDL_LIBS) $(EXTRALIBS)
  312.  
  313. # Depend upon sysinfo.c to avoid building both nlmheader.c and sysinfo.c
  314. # simultaneously.
  315. nlmheader.c: nlmheader.y sysinfo.c
  316.     $(BISON) $(srcdir)/nlmheader.y
  317.     rm -f nlmheader.c
  318.     mv -f y.tab.c nlmheader.c
  319.  
  320. nlmconv.o: nlmconv.c
  321.     ldname=`t='$(program_transform_name)'; echo ld | sed -e "s/brokensed/brokensed/" $$t`; \
  322.     $(CC) -c -DLD_NAME="\"$${ldname}\"" $(INCLUDES) $(HDEFINES) $(TDEFINES) $(NLMCONV_DEFS) $(CFLAGS) $(srcdir)/nlmconv.c
  323.  
  324. $(NLMCONV_PROG): nlmconv.o nlmheader.o $(ADDL_LIBS) $(BFD)
  325.     $(CC) $(CFLAGS) $(LDFLAGS) -o $@ nlmconv.o nlmheader.o $(ADDL_LIBS) $(EXTRALIBS)
  326.  
  327. # This list of dependencies was generated by doing a make with gcc -MM
  328. # saving the output in a file and removing the gcc commands
  329. # changing "../../devo/binutils/../bfd" to "$(BFDDIR)"
  330. # removing "../../devo/binutils/"
  331. # changing "../include" to "$(INCDIR)"
  332.  
  333. bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
  334.   $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
  335.   $(INCDIR)/fopen-same.h bucomm.h
  336. filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
  337.   $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
  338.   $(INCDIR)/fopen-same.h 
  339. size.o: size.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
  340.   $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
  341.   $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h 
  342. objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
  343.   $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
  344.   $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h \
  345.   $(INCDIR)/dis-asm.h $(INCDIR)/aout/aout64.h \
  346.   $(INCDIR)/elf/internal.h $(INCDIR)/aout/stab.def 
  347. nm.o: nm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
  348.   $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
  349.   $(INCDIR)/fopen-same.h bucomm.h $(INCDIR)/getopt.h \
  350.   $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
  351.   $(INCDIR)/aout/ranlib.h $(INCDIR)/demangle.h
  352. ar.o: ar.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
  353.   $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
  354.   $(INCDIR)/fopen-same.h bucomm.h $(INCDIR)/aout/ar.h \
  355.   $(BFDDIR)/libbfd.h arsup.h 
  356. arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
  357.   $(INCDIR)/obstack.h arsup.h 
  358. arlex.o: arlex.c ./arparse.h 
  359. not-ranlib.o: not-ranlib.c 
  360. arsup.o: arsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
  361.   $(INCDIR)/obstack.h arsup.h bucomm.h 
  362. strings.o: strings.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
  363.   $(INCDIR)/obstack.h bucomm.h 
  364. objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
  365.   $(INCDIR)/obstack.h ../bfd/sysdep.h $(BFDDIR)/hosts/std-host.h \
  366.   $(INCDIR)/fopen-same.h bucomm.h 
  367. is-strip.o: is-strip.c 
  368. is-ranlib.o: is-ranlib.c 
  369. not-strip.o: not-strip.c 
  370. nlmheader.o: nlmheader.c ../bfd/bfd.h ../bfd/sysdep.h \
  371.   $(BFDDIR)/hosts/std-host.h $(INCDIR)/fopen-same.h bucomm.h \
  372.   $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h nlmconv.h
  373. nlmconv.o: nlmconv.c ../bfd/bfd.h $(INCDIR)/libiberty.h ../bfd/sysdep.h \
  374.   $(BFDDIR)/hosts/std-host.h $(INCDIR)/fopen-same.h bucomm.h \
  375.   $(BFDDIR)/libnlm.h $(INCDIR)/nlm/common.h \
  376.   $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmconv.h \
  377.   $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
  378.  
  379. stage1: force
  380.     - mkdir stage1
  381.     - mv -f $(STAGESTUFF) stage1
  382.  
  383. stage2: force
  384.     - mkdir stage2
  385.     - mv -f $(STAGESTUFF) stage2
  386.  
  387. stage3: force
  388.     - mkdir stage3
  389.     - mv -f $(STAGESTUFF) stage3
  390.  
  391. against=stage2
  392.  
  393. comparison: force
  394.     for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
  395.  
  396. de-stage1: force
  397.     - (cd stage1 ; mv -f * ..)
  398.     - rmdir stage1
  399.  
  400. de-stage2: force
  401.     - (cd stage2 ; mv -f * ..)
  402.     - rmdir stage2
  403.  
  404. de-stage3: force
  405.     - (cd stage3 ; mv -f * ..)
  406.     - rmdir stage3
  407.  
  408. ######################################################################
  409. # DOCUMENTATION TARGETS
  410. # TeX output
  411. binutils.dvi: $(srcdir)/binutils.texi
  412.     TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/binutils.texi
  413.  
  414. # info file for online browsing
  415. binutils.info: $(srcdir)/binutils.texi
  416.     $(MAKEINFO) -o binutils.info $(srcdir)/binutils.texi
  417.  
  418. $(DEMANGLER_PROG).1: cxxfilt.man Makefile
  419.     sed -e 's/@PROGRAM@/$(DEMANGLER_PROG)/' < $(srcdir)/cxxfilt.man \
  420.         > $(DEMANGLER_PROG).1
  421.  
  422. #   different targets for -ms, -mm, -me
  423. # Try to use a recent texi2roff.  v2 was put on prep in jan91.
  424. # If you want an index, see texi2roff doc for postprocessing 
  425. # and add -i to texi2roff invocations below.
  426. # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete
  427. #    corresponding -e lines when later texi2roff's are current)
  428. # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs.
  429. # + @c's deleted explicitly because texi2roff sees texinfo commands in them
  430. # + @   (that's at-BLANK) not recognized by texi2roff, turned into blank
  431. # + @alphaenumerate is ridiculously new, turned into @enumerate
  432.  
  433. # roff output (-ms)
  434. binutils.ms: $(srcdir)/binutils.texi
  435.     sed -e '/\\input texinfo/d' \
  436.         -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
  437.         -e '/^@ifinfo/,/^@end ifinfo/d' \
  438.         -e '/^@c/d' \
  439.         -e 's/{.*,,/{/' \
  440.         -e 's/@ / /g' \
  441.         -e 's/^@alphaenumerate/@enumerate/g' \
  442.         -e 's/^@end alphaenumerate/@end enumerate/g' \
  443.         $(srcdir)/binutils.texi | \
  444.     $(TEXI2ROFF) -ms | \
  445.     sed -e 's/---/\\(em/g' \
  446.     >binutils.ms 
  447.  
  448. # roff output (-mm)
  449. # '@noindent's removed due to texi2roff-2 mm bug; if yours is newer, 
  450. #   try leaving them in
  451. binutils.mm: $(srcdir)/binutils.texi
  452.     sed -e '/\\input texinfo/d' \
  453.         -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
  454.         -e '/^@ifinfo/,/^@end ifinfo/d' \
  455.         -e '/^@c/d' \
  456.         -e 's/{.*,,/{/' \
  457.         -e '/@noindent/d' \
  458.         -e 's/@ / /g' \
  459.         -e 's/^@alphaenumerate/@enumerate/g' \
  460.         -e 's/^@end alphaenumerate/@end enumerate/g' \
  461.         $(srcdir)/binutils.texi | \
  462.     $(TEXI2ROFF) -mm | \
  463.     sed -e 's/---/\\(em/g' \
  464.         >binutils.mm
  465.  
  466. # roff output (-me)
  467. binutils.me: $(srcdir)/binutils.texi
  468.     sed -e '/\\input texinfo/d' \
  469.         -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \
  470.         -e '/^@ifinfo/,/^@end ifinfo/d' \
  471.         -e '/^@c/d' \
  472.         -e 's/{.*,,/{/' \
  473.         -e 's/@ / /g' \
  474.         -e 's/^@alphaenumerate/@enumerate/g' \
  475.         -e 's/^@end alphaenumerate/@end enumerate/g' \
  476.         $(srcdir)/binutils.texi | \
  477.     $(TEXI2ROFF) -me | \
  478.     sed -e 's/---/\\(em/g' \
  479.     >binutils.me 
  480.  
  481.  
  482. ######################################################################
  483.  
  484. mostlyclean:
  485.     -rm -f *.o *~ \#* core binutils.?? binutils.???
  486. clean: mostlyclean
  487.     @if [ -d testsuite ] ; then \
  488.       cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) clean ; \
  489.     else true; fi
  490.     -rm -f $(PROGS) underscore.c
  491. distclean:
  492.     @if [ -d testsuite ] ; then \
  493.       cd testsuite ; $(MAKE) $(FLAGS_TO_PASS) distclean ; \
  494.     else true; fi
  495.     -rm -f Makefile config.status sysdep.h *.o *~ \#* core y.* \
  496.         binutils.?? binutils.??s binutils.aux binutils.log binutils.toc
  497.     -rm -f $(PROGS) underscore.c
  498. realclean: clean distclean
  499.     -rm -f $(DISTSTUFF) TAGS
  500.  
  501. etags tags: TAGS
  502.  
  503. TAGS: force
  504.     etags $(INCDIR)/*.h $(srcdir)/*.[hc] 
  505.  
  506. install: all $(DEMANGLER_PROG).1
  507.     for i in $(PROGS) ; do \
  508.       $(INSTALL_XFORM) $$i $(bindir)/`echo $$i | sed -e 's/.new//'` ; \
  509.     done
  510.     for i in $(MANPAGES) ; do \
  511.       $(INSTALL_XFORM1) $(srcdir)/$$i.1 $(man1dir)/$$i.1 ; \
  512.     done
  513.     $(INSTALL_XFORM1) $(DEMANGLER_PROG).1 $(man1dir)/$(DEMANGLER_PROG).1
  514.     -if [ -d $(tooldir) ]; then \
  515.       if [ -d $(tooldir)/bin ]; then true; else mkdir $(tooldir)/bin; fi; \
  516.       for i in $(TOOL_PROGS) ; do \
  517.         j=`echo $$i | sed -e 's/.new//'`; \
  518.         rm -f $(tooldir)/bin/$$j; \
  519.         k=`t='$(program_transform_name)'; echo $$j | sed -e s/x/x/ $$t`; \
  520.         ln $(bindir)/$$k $(tooldir)/bin/$$j >/dev/null 2>/dev/null \
  521.          || $(INSTALL_PROGRAM) $$i $(tooldir)/bin/$$j; \
  522.       done; \
  523.      else true; fi
  524.  
  525. # This little path search is required because in the FSF net releases,
  526. # the info files are included in the source tree, and that may not be
  527. # the same as the build directory.
  528. install-info: binutils.info
  529.     if [ -r binutils.info ]; then \
  530.       dir=. ; \
  531.     else \
  532.       dir=$(srcdir) ; \
  533.     fi ; \
  534.     for i in `cd $$dir; echo binutils.info*` ; do \
  535.         $(INSTALL_DATA) $$dir/$$i $(infodir)/$$i ; \
  536.     done
  537.  
  538. clean-info:
  539.     -rm -rf *.info*
  540.  
  541. # Making a dist:
  542. # cvs rtag binutils-x-yy ld+utils
  543. # cvs co -r binutils-x-yy ld+utils
  544. # Sanitize
  545. # cd {HERE}; make dist [-f Makefile.in]
  546.  
  547. dist: $(DIST_NAME).tar.z
  548.  
  549. diststuff: $(DISTSTUFF)
  550.  
  551. $(DIST_NAME).tar.z:
  552.     cd ../..; rm -f $(DIST_NAME); ln -s devo $(DIST_NAME)
  553.     make diststuff -f Makefile.in
  554.     cd ../ld; make diststuff -f Makefile.in
  555.     cd ../gprof; make diststuff -f Makefile.in
  556.     cd ../texinfo; mv texinfo.tex ..; rm -rf *; mv ../texinfo.tex .
  557.     # Take out texinfo from configurable dirs
  558.     mv ../configure.in tmp; \
  559.       sed -e '/^host_tools=/s/texinfo //' <tmp >../configure.in; rm tmp
  560.     cd ..; chmod og=u `find . -print`
  561.     cd ../..; tar chf - $(DIST_NAME) | gzip >$(DIST_NAME).tar.z
  562.     rm -rf ../../$(DIST_NAME)
  563.  
  564. #-----------------------------------------------------------------------------
  565. #        'STANDARD' GNU/960 TARGETS BELOW THIS POINT
  566. #
  567. # 'VERSION' file must be present and contain a string of the form "x.y"
  568. #-----------------------------------------------------------------------------
  569.  
  570. ver960.c: FORCE
  571.     rm -f ver960.c
  572.     echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
  573.  
  574.  
  575. # Dummy target to force execution of dependent targets.
  576. #
  577. force:
  578.  
  579. # Target to uncomment host-specific lines in this makefile.  Such lines must
  580. # have the following string beginning in column 1: #__<hostname>__#
  581. # Original Makefile is backed up as 'Makefile.old'.
  582. #
  583. # Invoke with:  make make HOST=xxx
  584. #
  585. make:
  586.     -@if test $(HOST)x = x ; then \
  587.         echo 'Specify "make make HOST=???"'; \
  588.         exit 1; \
  589.     fi ; \
  590.     grep -s "^#The next line was generated by 'make make'" Makefile; \
  591.     if test $$? = 0 ; then    \
  592.         echo "Makefile has already been processed with 'make make'";\
  593.         exit 1; \
  594.     fi ; \
  595.     mv -f Makefile Makefile.old; \
  596.     echo "#The next line was generated by 'make make'"     >Makefile ; \
  597.     echo "HOST=$(HOST)"                    >>Makefile ; \
  598.     echo                            >>Makefile ; \
  599.     sed "s/^#__$(HOST)__#//" < Makefile.old            >>Makefile
  600.  
  601. Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
  602.     $(SHELL) ./config.status
  603.  
  604. ### Local Variables: ***
  605. ### mode:fundamental ***
  606. ### page-delimiter: "^# " ***
  607. ### End: ***
  608. ### end of file
  609.